﻿#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

namespace BreakOutBattles.IO.Net
{
    public class NetworkManager
    {
        private GameServer gameServer;
        private GameNetClient gameNetClient;
        private static NetworkManager networkManager;

        private NetworkManager()
        {
            gameServer = new GameServer();
        }

        /// <summary>
        /// Gets an instance of the current game server.
        /// </summary>
        public GameServer GameServer
        {
            get { return gameServer; }
        }

        /// <summary>
        /// Gets an instance of the current game server.
        /// </summary>
        public GameNetClient GameNetClient
        {
            get { return gameNetClient; }
            set { gameNetClient = value; }
        }

        /// <summary>
        /// Gets an instance of this singletone object.
        /// </summary>
        public static NetworkManager Instance
        {
            get
            {
                if (networkManager == null)
                {
                    networkManager = new NetworkManager();
                }

                return networkManager;
            }
        }
    }
}
